<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://xmlns.jcp.org/jsf/passthrough">

    <body>

        <ui:composition template="./template.xhtml">

            <ui:define name="title">
                Kuchařka - registrace
            </ui:define>

            <ui:define name="breadcrumbs">
                <h:commandLink action="index" value="Kuchařka"/> > Registrace
            </ui:define>

            <ui:define name="heading">
                Registrace
            </ui:define>

            <ui:define name="subheading">
                Po vyplnění údajů klepněte na tlačítko "Zaregistrovat se". Povinné položky jsou červeně ohraničeny.
            </ui:define>

            <ui:define name="content">
                <h:form>
                    <table align="center" style="border-collapse: separate; border-spacing: 10px;">
                        <tr>
                            <td colspan="2">
                                <div class="has-error">
                                    <h:inputText class="form-control" maxlength="10" value="#{RegistraceView.username}" p:placeholder="Přihlašovací jméno" required="true"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <h:inputText class="form-control" maxlength="10" value="#{RegistraceView.jmeno}" p:placeholder="Křestní jméno"/>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <h:inputText class="form-control" maxlength="10" value="#{RegistraceView.prijmeni}" p:placeholder="Příjmení"/>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                              <div class="has-error">
                                  <h:inputText class="form-control" maxlength="10" value="#{RegistraceView.password}" p:placeholder="Heslo" required="true"/>
                              </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div class="has-error">
                                    <h:inputText class="form-control" maxlength="10" value="#{RegistraceView.passcheck}" p:placeholder="Heslo znovu" required="true"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <h:commandButton id="submit_registrace" class="btn btn-primary" value="Zaregistrovat se" action="#{RegistraceView.register()}"/>
                            </td>
                            <td align="right">
                                <h:commandButton id="zrusit" class="btn btn-danger" value="Zrušit" action="index"/>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
